package com.orange.handler.expert.impl;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.orange.dbhelp.page.Page;
import com.orange.handler.expert.AuthExpertAdviceService;
import com.orange.modules.dao.expert.AuthExpertAdviceRepository;
import com.orange.modules.entity.expert.AuthExpertAdvice;

@Service
public class AuthExpertAdviceServiceImpl implements AuthExpertAdviceService {

	@Autowired
	private AuthExpertAdviceRepository authExpertAdviceRepository;

	@Override
	public void saveAuthExpertAdvice(AuthExpertAdvice a) {
		
		authExpertAdviceRepository.saveAuthExpertAdvice(a);
	}

	@Override
	public List<AuthExpertAdvice> queryAuthExpertAdviceByExpertIdAndGroupId(
			String expertId, String groupId) throws SQLException {
		List<AuthExpertAdvice> ae = authExpertAdviceRepository.queryAuthExpertAdviceByExpertIdAndGroupId(expertId, groupId);
		return ae;
	}

	@Override
	public List<AuthExpertAdvice> queryAuthExpertAdviceById(String pid)
			throws SQLException {
		List<AuthExpertAdvice> ae = authExpertAdviceRepository.queryAuthExpertAdviceById(pid);
		return ae;
	}

	@Override
	public Page<AuthExpertAdvice> queryAuthExpertAdviceByPage(
			Map<String, String> map) throws SQLException {
		Page<AuthExpertAdvice> page = authExpertAdviceRepository.queryAuthExpertAdviceByPage(map);
		return page;
	}
}
